package com.chen.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chen.pojo.Sign;

import com.chen.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author chen
 *
 * 签到
 */
@SuppressWarnings("all")
@Mapper
public interface SignMapper extends BaseMapper<Sign> {

//查询某一个人
    @Select("select *from sign  where id=#{id} ")
    Sign selectById(@Param("id") int id);


//    查询今天日期是否过期
    @Select("select *from sign where TO_DAYS(time) =TO_DAYS(NOW()) and username=#{username}")
   Sign  selectIsSigned(@Param("username") String username);



}
